import {Func} from '@/types/utils';

const delay = (callback: Func, duration: number) => {
    const timer = setTimeout(() => {
        callback();
        clearTimeout(timer);
    }, duration);
};

export default delay;
